package com.rzj.book.en;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * 订单实体类
 * @author Administrator *
 */
public class Order {


	public enum State {
		NOTPAY("未付款"), PAY("已付款"), DELIVERY("已发货"), DEAL("已收货");
		private String desc;

		private State(String desc) {
			this.desc = desc;
		}

		public String getDesc() {
			return desc;
		}
	}

	private Long orderid;
	
	private Double total;
	
	private Date orderTime;
	
	private State state;// 1:未付款   2:订单已经付款   3:已经发货   4:订单结束
	
	private String name;
	
	private String phone;
	
	private String addr;
	
	// 用户的外键:对象
	private User user;
	
	// 配置订单项的集合
	private List<Orderdetail> orderdetail = new ArrayList<Orderdetail>();

	public Long getOrderid() {
		return orderid;
	}

	public void setOrderid(Long orderid) {
		this.orderid = orderid;
	}

	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}

	public Date getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public List<Orderdetail> getOrderdetail() {
		return orderdetail;
	}

	public void setOrderdetail(List<Orderdetail> orderdetail) {
		this.orderdetail = orderdetail;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}

	public State getState() {
		return state;
	}

	public void setState(State state) {
		this.state = state;
	}
}

